package main

import (
	"fmt"
	"bytes"
)

func main() {
	var b1 bytes.Buffer
	contents := "Make the plan."
	b1.WriteString(contents)
	fmt.Printf("Lan: %d\tCap: %d\n", b1.Len(), b1.Cap())

	p1 := make([]byte, 5)
	n, _ := b1.Read(p1)  // 忽略错误
	fmt.Println(n, string(p1))
	fmt.Printf("Lan: %d\tCap: %d\n", b1.Len(), b1.Cap())
}